﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XLua;

namespace Point24
{
    public class GameManager : MonoBehaviour
    {
        static public GameManager instance { get; set; }

        LuaManager _luaManager = null;
        ResourceManager _resManager = null;

        public ResourceManager resMgr { get { return _resManager; } }

        public LuaManager luaMgr { get { return _luaManager; } }

        // Use this for initialization
        void Start()
        {
            if (instance == null) {
                instance = this;
            }

            _resManager = gameObject.AddComponent<ResourceManager>();
            _luaManager = gameObject.AddComponent<LuaManager>();

            _luaManager.luaenv.DoString("require 'Main' ");
        }

        // Update is called once per frame
        void Update()
        {

        }

        private void OnDestroy()
        {
            
        }
    }

}
